package com.ecloud.openapi.translate.dto;

import java.time.LocalDateTime;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import com.ecloud.common.base.model.BaseDto;
import com.ecloud.common.base.valid.ValidGroup.Insert;

import lombok.Getter;
import lombok.Setter;

/**
 * 基础字典表 DTO模型
 *
 * @author LiuGangQiang Create in 2021/08/09
 */
@Getter
@Setter
public class BaseDictionaryDto extends BaseDto<Long> {
    private static final long serialVersionUID = 1L;
    /**
     * 字段描述: 类型 <br>
     * 数据类型: varchar(64)
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotBlank(message = "{translate.base.dictionary.type.not.blank}", groups = { Insert.class })
    @Length(message = "{translate.base.dictionary.type.length}", min = 1, max = 64, groups = { Insert.class })
    private String type;
    /**
     * 字段描述: 父级编码 <br>
     * 数据类型: varchar(32)
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    private String pcode;
    /**
     * 字段描述: 编码 <br>
     * 数据类型: varchar(32)
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotBlank(message = "{translate.base.dictionary.code.not.blank}", groups = { Insert.class })
    @Length(message = "{translate.base.dictionary.code.length}", min = 1, max = 32, groups = { Insert.class })
    private String code;
    /**
     * 字段描述: 内容 <br>
     * 数据类型: varchar(1024)
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotBlank(message = "{translate.base.dictionary.content.not.blank}", groups = { Insert.class })
    @Length(message = "{translate.base.dictionary.content.length}", min = 1, max = 1024, groups = { Insert.class })
    private String content;
    /**
     * 字段描述: 语言 例如zh_CN <br>
     * 数据类型: varchar(8)
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotBlank(message = "{translate.base.dictionary.language.not.blank}", groups = { Insert.class })
    @Length(message = "{translate.base.dictionary.language.length}", min = 1, max = 8, groups = { Insert.class })
    private String language;
    /**
     * 字段描述: 排序 <br>
     * 数据类型: tinyint(4) unsigned
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotNull(message = "{translate.base.dictionary.sort.not.null}", groups = { Insert.class })
    @Range(message = "{translate.base.dictionary.sort.range}", min = 1, max = 254, groups = { Insert.class })
    private Integer sort;
    /**
     * 字段描述: 是否启用 <br>
     * 数据类型: tinyint(1) unsigned
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    @NotNull(message = "{translate.base.dictionary.enable.not.null}", groups = { Insert.class })
    private Boolean enable;
    /**
     * 字段描述: 修改时间 <br>
     * 数据类型: datetime
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    private LocalDateTime updateTime;
    /**
     * 字段描述: 创建时间 <br>
     * 数据类型: datetime
     *
     * @author LiuGangQiang Create in 2021/08/09
     */
    private LocalDateTime createTime;
}
